<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./vue.js"> </script>
</head>
<body>
  <div id="app">
    <div>
      <div>
        <input type="text" @input="inputChagne">
        <button @click="add">add</button>
      </div>
      <ul>
        <li v-for="item,index in list">
          {{index}}.{{item}} 
          <button>删除</button>
          <button>完成</button>
        </li>
      </ul>
    </div>
  </div>

  <script>
    new Vue({
      el: "#app", 
      data: {   
       val:'',  
       list: [
        "今晚咒怨",
        "今晚物业凶铃",
        "12312"
       ]
      },
      methods: {
        inputChagne(e) {
          console.log(e.target.value)
          this.val = e.target.value
        },
        add() {
          this.list.push(this.val)
        }
      }
    })
  </script>
</body>
</html>
<!--
 完成todolist 删除功能
 完成功能
 完成的事件和未完成的事件背景颜色不一样
 9*9乘法表
 1. 隔行变色
 2. 鼠标滑过有特效
 3. 通过下拉菜单能控制 隔行变色变色
  -->